package com.base.pig.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.base.pig.entity.MonthReport;
import com.base.pig.mapper.MonthReportMapper;
import com.base.pig.service.MonthReportService;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yjh
 * @since 2022-05-24
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, MonthReport> implements MonthReportService {

    @NonNull
    MonthReportMapper monthReportMapper;
    @Override
    public List<MonthReport> getGatherMonthReport(String date) {
        return monthReportMapper.getGatherMonthReport(date);
    }

    @Override
    public List<MonthReport> getGatherYearReport(String startDate, String endDate, String deviceId, String sensorCode) {
        return monthReportMapper.getGatherYearReport(startDate,  endDate,  deviceId,  sensorCode);
    }
}
